import {Button, Result} from "antd";
import {useNavigate} from "react-router-dom";

const NotFound = () => {
    const navigate = useNavigate();
    const goHome = () => {
        navigate({pathname: '/home'}, {replace: true});
    };
    return (
        <div className="[&_.ant-result]:flex [&_.ant-result]:flex-col [&_.ant-result]:items-center [&_.ant-result]:justify-center [&_.ant-result]:h-full [&_.ant-result-image]:m-[0]">
            <Result status="404" title="404" subTitle="无法进入此页面，请检查您输入的网址是否正确，或点击下方按钮返回首页。"
                    extra={<Button type="primary" onClick={goHome}>返回首页</Button>}
            />
        </div>
    );
};

export default NotFound;
